package com.grj.parking;


import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;
import java.io.IOException;

@Slf4j
@SpringBootApplication
@MapperScan("com.grj.parking.mapper")
@EnableScheduling
public class App {
    public static void main( String[] args ){
        SpringApplication.run(App.class, args);
    }

    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

//    @Resource


//    @Scheduled(fixedDelay = 1000)
//    public void syncParkingLot() throws IOException {
////        long l = System.currentTimeMillis();
////        System.out.println("同步完成，耗时：" + (System.currentTimeMillis() - l));
//    }
}